home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / Notification.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  2.7 KB  |  105 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Notification.h
  3.  
  4.      Contains:    Notification Manager interfaces
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1989-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __NOTIFICATION__
  18. #define __NOTIFICATION__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23. #ifndef __OSUTILS__
  24. #include <OSUtils.h>
  25. #endif
  26.  
  27.  
  28.  
  29. #if PRAGMA_ONCE
  30. #pragma once
  31. #endif
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. #if PRAGMA_IMPORT
  38. #pragma import on
  39. #endif
  40.  
  41. #if PRAGMA_STRUCT_ALIGN
  42.     #pragma options align=mac68k
  43. #elif PRAGMA_STRUCT_PACKPUSH
  44.     #pragma pack(push, 2)
  45. #elif PRAGMA_STRUCT_PACK
  46.     #pragma pack(2)
  47. #endif
  48.  
  49. typedef struct NMRec                     NMRec;
  50. typedef NMRec *                            NMRecPtr;
  51. typedef CALLBACK_API( void , NMProcPtr )(NMRecPtr nmReqPtr);
  52. typedef STACK_UPP_TYPE(NMProcPtr)                                 NMUPP;
  53.  
  54. struct NMRec {
  55.     QElemPtr                         qLink;                        /* next queue entry*/
  56.     short                             qType;                        /* queue type -- ORD(nmType) = 8*/
  57.     short                             nmFlags;                    /* reserved*/
  58.     long                             nmPrivate;                    /* reserved*/
  59.     short                             nmReserved;                    /* reserved*/
  60.     short                             nmMark;                        /* item to mark in Apple menu*/
  61.     Handle                             nmIcon;                        /* handle to small icon*/
  62.     Handle                             nmSound;                    /* handle to sound record*/
  63.     StringPtr                         nmStr;                        /* string to appear in alert*/
  64.     NMUPP                             nmResp;                        /* pointer to response routine*/
  65.     long                             nmRefCon;                    /* for application use*/
  66. };
  67.  
  68. enum { uppNMProcInfo = 0x000000C0 };                             /* pascal no_return_value Func(4_bytes) */
  69. #define CallNMProc(userRoutine, nmReqPtr)                         CALL_ONE_PARAMETER_UPP((userRoutine), uppNMProcInfo, (nmReqPtr))
  70. #define NewNMProc(userRoutine)                                     (NMUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNMProcInfo, GetCurrentArchitecture())
  71.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  72.                                                                                             #pragma parameter __D0 NMInstall(__A0)
  73.                                                                                             #endif
  74. EXTERN_API( OSErr )
  75. NMInstall                        (NMRecPtr                 nmReqPtr)                            ONEWORDINLINE(0xA05E);
  76.  
  77.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  78.                                                                                             #pragma parameter __D0 NMRemove(__A0)
  79.                                                                                             #endif
  80. EXTERN_API( OSErr )
  81. NMRemove                        (NMRecPtr                 nmReqPtr)                            ONEWORDINLINE(0xA05F);
  82.  
  83.  
  84.  
  85. #if PRAGMA_STRUCT_ALIGN
  86.     #pragma options align=reset
  87. #elif PRAGMA_STRUCT_PACKPUSH
  88.     #pragma pack(pop)
  89. #elif PRAGMA_STRUCT_PACK
  90.     #pragma pack()
  91. #endif
  92.  
  93. #ifdef PRAGMA_IMPORT_OFF
  94. #pragma import off
  95. #elif PRAGMA_IMPORT
  96. #pragma import reset
  97. #endif
  98.  
  99. #ifdef __cplusplus
  100. }
  101. #endif
  102.  
  103. #endif /* __NOTIFICATION__ */
  104.  
  105.